﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using ARR.Entities;

namespace ARR.Services
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "ICategoriesService" in both code and config file together.
    [ServiceContract]
    public interface ICategoriesService
    {
        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        List<Category> GetAll();

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        List<Category> GetCleanCPCategories();

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        List<CategoryUniverse> GetCategoryUniverses();

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        List<CategoryRole> GetCategoryRoles();

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        List<Category> GetByLevel(int level);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        List<Category> GetByLevels(int level);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        List<Category> GetByParentId(int parentId);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        void SaveCategoryMatches(List<CategoryMatch> matches);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        List<TheoreticalMargin> GetTheoreticalMargins(int countryId);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        void SaveTheoreticalMargins(List<TheoreticalMargin> margins);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        List<CategoryMatch> GetCategoryMatches(int countryId);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        void SaveCategoryMatchesMaster(List<CategoryMatch> matches);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        void SaveHierarchy(List<Category> categories);
    }
}
